package org.crh.share.impl;

import org.crh.share.ScheduleService;
import org.crh.share.mapper.ScheduleMapper;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * @description:
 * @author: RenHai Chen
 * @date: 2025/4/3 15:43
 */
@Service
public class ScheduleServiceImpl implements ScheduleService {
    @Resource
    ScheduleMapper scheduleMapper;

    @Override
    public int selectStock(Long slotId) {
        return scheduleMapper.selectStock(slotId);
    }

    @Override
    public List<Long> getAllIds() {
        return scheduleMapper.getAllIds();
    }

    @Override
    public int reduceStock(Long slotId, int reduceNum, int version) {
        return scheduleMapper.reduceStock(slotId, reduceNum, version);
    }
}
